package com.oocl.o2o.admin.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
@GenericGenerator(strategy = "uuid", name = "comlaintuuid")
public class ComplaintInfo {
	@Id
	@GeneratedValue(generator = "comlaintuuid")
	@Column(columnDefinition = "char(32)")
	private String id;
	@ManyToOne(targetEntity = Merchant.class)
	@JoinColumn(name = "merchant_id",columnDefinition="char(32)",nullable=false)
	private Merchant merchant;
	private String Content;
	@Temporal(TemporalType.TIMESTAMP)
	private Date sendDate;
	
	
	public ComplaintInfo() {
		super();
	}
	public ComplaintInfo(Merchant merchant, String content, Date sendDate) {
		super();
		this.merchant = merchant;
		Content = content;
		this.sendDate = sendDate;
	}
	public ComplaintInfo(String id, Merchant merchant, String content,
			Date sendDate) {
		super();
		this.id = id;
		this.merchant = merchant;
		Content = content;
		this.sendDate = sendDate;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Merchant getMerchant() {
		return merchant;
	}
	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}
	public String getContent() {
		return Content;
	}
	public void setContent(String content) {
		Content = content;
	}
	public Date getSendDate() {
		return sendDate;
	}
	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}
	@Override
	public String toString() {
		return "ComplaintInfo [id=" + id + ", Content=" + Content + ", sendDate=" + sendDate + "]";
	}

	

}
